#include<algorithm>
#include<iostream>
#include<vector>
#include<wx/wx.h>
#include "point.h"

#define ID_PLAYER_PUTIH 132
#define ID_PLAYER_PUTIH_RAJA 133
#define ID_PLAYER_HITAM 134 //jalan pertama
#define ID_PLAYER_HITAM_RAJA 135
#define DEBUG() cout<<"pass"<<endl;

using  namespace std;

static bool isGameEnd=false;

class Solver
{
    public:
    Solver(int size);
    ~Solver();
    void moveByGreedyTypeOne(int playerid,int size,bool* isstillturn,int* movetype,bool* isgerak);
    void moveByGreedyTypeTwo(int playerid,int size,bool* isstillturn,int* movetype,bool* isgerak);
    void setBoardSize(int n);
    void setCell(int cellid,int row,int col);
    void moveCell(int rf,int cf,int rt,int ct);
    void debugBoard(int size);
    void tesPointer(wxPoint* p);
    int** getBoard();
    void setBoard(int**);

    int numBackup(int playerid,int row,int col);
    wxPoint getSource();
    wxPoint getDest();

    bool canMove(int playerid);
    bool updateGameStatus(int size);

    int size;
    int **board;
    int dr[4],dc[4];
    wxPoint source;
    wxPoint dest;

};
